﻿@model S4Store.Models.CarKpi.CarModelListModel
@{
    Layout = null;
    ViewBag.Title = "SellerList";
}
@{int i = 0;}
@foreach (var brand in Model.CarBrands)
{
    var models =  brand.EnableCarModels.ToList();
    for (int j = 0; j < models.Count(); j++)
    {
        var config = Model.GetCarModelMonthConfig(models[j].Id);
        <tr>
            @if(j==0)
            {
                <th width="36" rowspan="@models.Count()">@brand.Name</th>
                    
            }
            <td width="115">@models[j].Name
            <input type="hidden" name="carmodel[@i].CarModelId" value="@models[j].Id" />
            </td>
            <td width="70"><input type="checkbox"  name="carmodel[@i].Enble" value="true" @if(config.Enble)
                                                                               {
                                                                                   <text>checked="checked"</text>
                                                                               }/></td>
            <td width="70"><input type="text" class="textInput numberinput" size="5" name="carmodel[@i].SaleTarget" value="@config.SaleTarget" /></td>
            <td width="70"><input type="text" class="textInput numberinput" size="5" name="carmodel[@i].LastMonthInventory" value="@config.LastMonthInventory" /></td>
            <td width="70"><input type="text" class="textInput numberinput" size="5" name="carmodel[@i].LastMonthGive" value="@config.LastMonthGive" /></td>
            <td width="70"><input type="text" class="textInput numberinput" size="5" name="carmodel[@i].LastMonthNotGive" value="@config.LastMonthNotGive" /></td>
            <td width="70"><input type="text" class="textInput numberinput" size="5" name="carmodel[@i].JHTC" value="@config.JHTC" /></td>
          
            <td width="70"><input type="checkbox"  name="carmodel[@i].IsLstTenVersion" value="true" @if (config.IsLstTenVersion)
                                                                               {
                                                                                   <text>checked="checked"</text>
                                                                               }/></td>
            <td width="70"><input type="checkbox"  name="carmodel[@i].IsMidTenVersion" value="true" @if (config.IsMidTenVersion)
                                                                               {
                                                                                   <text>checked="checked"</text>
                                                                               }/></td>
            <td width="70"><input type="checkbox"  name="carmodel[@i].IsLastTenVersion" value="true" @if (config.IsLastTenVersion)
                                                                               {
                                                                                   <text>checked="checked"</text>
                                                                               }/></td>
            
        </tr>
        i++;
    }
   

}

